/**
 * File    : RegistrationSuccess.java
 * Created : 2008-10-17
 * By      : LuHuiguo
 */
package com.luhuiguo.sso.web.pages;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.luhuiguo.sso.entity.User;

/**
 * @author LuHuiguo
 * @version $Id: RegistrationSuccess.java 20 2008-10-19 15:43:48Z LuHuiguo $
 * 
 */
public class RegistrationSuccess {

	@Inject
	private Messages messages;

	@Property
	@Persist
	private User user;

	Object initialize(User user) {
		this.user = user;
		return this;
	}

	public String getMessage() {
		return messages.format("user.created", user.getUsername());

	}

}
